package st.business.tepth.business.goodscheck;

import java.util.List;

import io.reactivex.disposables.Disposable;
import st.business.tepth.base.OnDataConvertListener;
import st.business.tepth.business.bean.MaterialCheckBean;
import st.shadow.library.core.base.mvp.BaseModel;
import st.shadow.library.core.base.mvp.BasePresenter;
import st.shadow.library.core.base.mvp.BaseView;

/**
 * Author: shadow
 * Email:  1025431817@qq.com
 * Time:   2019-02-26 15:58
 */

public interface GoodsCheckContract {
    interface View extends BaseView {
        void showData(List<MaterialCheckBean> list);

        void checkSucceed(String msg);

        void showError(String msg);
    }

    interface Model extends BaseModel {
        Disposable getData(String token,
                           OnDataConvertListener<List<MaterialCheckBean>> listener);

        Disposable check(String token, String items,
                         String taskId, int status,
                         OnDataConvertListener<String> checkListener,
                         OnDataConvertListener<List<MaterialCheckBean>> dataListener);
    }

    abstract class Presenter extends BasePresenter<View> {
        abstract void getData(String token);

        abstract void check(String token, String items, String taskId, int status);
    }
}
